-
Notifications
You must be signed in to change notification settings - Fork 48
support Jackson v3 #837
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support Jackson v3 #837
Conversation
docs javafmt jackson2 in docs Update build.sbt fix tests by using jackson 2 style config Update json-support.md Update json-support.md test fix Update json-support.md Update Jackson.java Update json-support.md revert format change
| } | ||
|
|
||
| private static ObjectMapper createMapper() { | ||
| return createMapper(ConfigFactory.load().getConfig("pekko.http.marshallers.jackson3")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible to make it overrideable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The API methods allow you to provide your own ObjectMapper so this code is just for the case where we need to create an ObjectMapper instance because the user hasn't provided one.
If we were to open this up, I would prefer if users were requesting it. This is a copy of the code from pekko-http-jackson and noone was requesting any changes to this for that module.
| + maxTokenCount | ||
| + "\n" | ||
| + "read.max-nesting-depth=" | ||
| + maxNestingDepth; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use """ in java 17?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The aim is to backport this PR to v1.3.0 so I need code that compiles with Java 8.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use the Java 17 version for this PR and then modify the cherry pick for 1.3.0 with git rebase, but it might be simpler to just stick with Java 8 syntax
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
docs javafmt jackson2 in docs Update build.sbt fix tests by using jackson 2 style config Update json-support.md Update json-support.md test fix Update json-support.md Update Jackson.java Update json-support.md revert format change
Idea is to leave pekko-http-jackson as supporting Jackson v2.x and to add a pekko-http-jackson3.
Jackson 3 is a significant rewrite and has lots of config changes compared to Jackson 2.
Aim is to backport this to 1.3.x branch to include in the 1.3.0 release.